<template>
	<view class="container">
		<web-view :src="url"></web-view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		CONFIG
	} from '../../utils/config'
	import {
		userStore
	} from '../../store/userStore'

	const store = userStore()
	// https://m.amap.com/navi/?start=parameter1&dest=
	// parameter2&destName=parameter3&key=
	// parameter5&jscode=您申请的安全密钥
	const url = ref("")
	onLoad((data) => {
		url.value = `${CONFIG.gaode_line_url}?start=${data.slon},${data.slat}&dest=${data.elon},${data.elat}
		&destName=${data.name}&key=${CONFIG.gaode_key}&jscode=${CONFIG.gaode_skey}`
		console.log(url.value)
	})
</script>

<style>

</style>